<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>
<script>
    var str = 'abcdefg'
    var arr= str.split("")
    console.log(arr);
    var arr1 =arr.reverse()
    console.log(arr1);
    var str1 =arr1.join("")
    console.log(str1);
</script>